<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>PHP global 关键词</title>
</head>
<body>
<?
$x=10;
$y=15;
function myTest(){
global $x,$y;
$y=$x+$y;}
myTest()
echo $y;
?>
</body>
</html>